/* 基础样式设置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary-color: #165DFF;
  --primary-light: #E8F3FF;
  --secondary-color: #36CFC9;
  --success-color: #52C41A;
  --warning-color: #FAAD14;
  --danger-color: #FF4D4F;
  --purple-color: #722ED1;
  --gray-light: #F5F7FA;
  --gray: #E5E6EB;
  --gray-dark: #86909C;
  --text-color: #1D2129;
  --text-light: #4E5969;
  --white: #FFFFFF;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s ease;
}

body {
  background-color: var(--gray-light);
  color: var(--text-color);
  line-height: 1.6;
}

/* 布局组件样式 */
.main-header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  color: var(--primary-color);
  font-size: 24px;
}

.logo h1 {
  font-size: 18px;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.main-container {
  display: flex;
  min-height: calc(100vh - 60px);
}

.sidebar {
  width: 220px;
  background-color: var(--white);
  box-shadow: var(--shadow);
  padding: 20px 0;
  height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
  overflow-y: auto;
}

.sidebar-nav {
  padding: 0 10px;
}

.content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.page {
  display: none;
}

.page.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.page-header {
  margin-bottom: 20px;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 5px;
}

.page-header p {
  color: var(--text-light);
}

.grid-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

@media (max-width: 1100px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
}

/* 卡片组件样式 */
.card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--gray);
}

/* 导航样式 */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 6px;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
  margin-bottom: 5px;
}

.nav-item:hover {
  background-color: var(--gray-light);
}

.nav-item.active {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 500;
}

.nav-item i {
  width: 20px;
  text-align: center;
}

/* 按钮样式 */
.primary-btn {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.primary-btn:hover {
  background-color: #0E42D2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
}

.secondary-btn {
  background-color: var(--white);
  color: var(--text-color);
  border: 1px solid var(--gray);
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.secondary-btn:hover {
  background-color: var(--gray-light);
  transform: translateY(-2px);
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* 统计卡片样式 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.stat-card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 20px;
}

.stat-icon.blue {
  background-color: var(--primary-color);
}

.stat-icon.green {
  background-color: var(--success-color);
}

.stat-icon.purple {
  background-color: var(--purple-color);
}

.stat-icon.red {
  background-color: var(--danger-color);
}

.stat-info h3 {
  font-size: 24px;
  font-weight: 600;
}

.stat-info p {
  color: var(--text-light);
  font-size: 14px;
}

/* 仪表盘样式 */
.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.schedule-item {
  display: flex;
  padding: 10px;
  border-radius: 6px;
  transition: var(--transition);
}

.schedule-item:hover {
  background-color: var(--gray-light);
}

.schedule-day {
  width: 60px;
  font-weight: 600;
  color: var(--text-light);
}

.schedule-content {
  flex: 1;
}

.schedule-content p {
  margin-bottom: 5px;
}

.schedule-content p:last-child {
  margin-bottom: 0;
}

.time {
  color: var(--primary-color);
  font-weight: 500;
  margin-right: 10px;
}

.lab-tag {
  background-color: var(--primary-light);
  color: var(--primary-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.assignment-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.assignment-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--gray);
}

.assignment-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.assignment-info h4 {
  font-weight: 600;
  margin-bottom: 5px;
}

.assignment-info p {
  color: var(--text-light);
  font-size: 14px;
}

.assignment-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.due-date {
  color: var(--text-light);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.view-btn {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.view-btn:hover {
  text-decoration: underline;
}

.chart-container {
  width: 100%;
  height: 300px;
  position: relative;
}

.small-chart {
  height: 200px;
}

/* 论坛样式 */
.forum-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  width: 300px;
}

.search-box input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gray);
  border-right: none;
  border-radius: 6px 0 0 6px;
  transition: var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-box button {
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 0 6px 6px 0;
  padding: 0 12px;
  cursor: pointer;
  transition: var(--transition);
}

.search-box button:hover {
  background-color: #0E42D2;
}

.forum-header {
  display: grid;
  grid-template-columns: 60% 15% 10% 15%;
}

.forum-column {
  font-weight: 600;
}

.forum-body {
  padding: 0;
}

.thread-item {
  display: grid;
  grid-template-columns: 60% 15% 10% 15%;
  padding: 15px 20px;
  border-bottom: 1px solid var(--gray);
  transition: var(--transition);
}

.thread-item:last-child {
  border-bottom: none;
}

.thread-item:hover {
  background-color: var(--gray-light);
}

.thread-info h4 {
  margin-bottom: 5px;
}

.thread-info h4 a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.thread-info h4 a:hover {
  color: var(--primary-color);
}

.thread-info p {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 8px;
}

.thread-tags {
  display: flex;
  gap: 5px;
}

.tag {
  background-color: var(--gray-light);
  color: var(--text-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.tag.html {
  background-color: #E67E2220;
  color: #E67E22;
}

.tag.frontend {
  background-color: #3498DB20;
  color: #3498DB;
}

.tag.nodejs {
  background-color: #2ECC7120;
  color: #2ECC71;
}

.tag.lab {
  background-color: #9B59B620;
  color: #9B59B6;
}

.tag.tools {
  background-color: #F39C1220;
  color: #F39C12;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-info img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.replies-column {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}

.last-post-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.last-post-info span:first-child {
  font-weight: 500;
}

.last-post-info span:last-child {
  color: var(--text-light);
  font-size: 14px;
}

.pagination {
  display: flex;
  list-style: none;
  gap: 5px;
  justify-content: center;
}

.pagination li a {
  display: inline-block;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-color);
  transition: var(--transition);
}

.pagination li.active a {
  background-color: var(--primary-color);
  color: var(--white);
}

.pagination li a:hover:not(.active) {
  background-color: var(--gray-light);
}

/* 作业提交样式 */
.assignments-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.assignments-filter select {
  padding: 8px 12px;
  border: 1px solid var(--gray);
  border-radius: 6px;
  background-color: var(--white);
  transition: var(--transition);
}

.assignments-filter select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.assignments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.assignment-card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.assignment-card:hover {
  box-shadow: var(--shadow-hover);
}

.assignment-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.assignment-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.assignment-status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.assignment-status.pending {
  background-color: #FAAD1420;
  color: #FAAD14;
}

.assignment-status.submitted {
  background-color: #52C41A20;
  color: #52C41A;
}

.assignment-status.graded {
  background-color: #165DFF20;
  color: #165DFF;
}

.assignment-details {
  padding: 15px 20px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-light);
}

.assignment-description {
  padding: 15px 20px;
  border-bottom: 1px solid var(--gray);
}

.assignment-description h4 {
  font-weight: 600;
  margin-bottom: 10px;
}

.assignment-attachments {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.attachment {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.attachment:hover {
  text-decoration: underline;
}

.submission-info {
  margin-top: 10px;
  padding: 10px;
  background-color: var(--gray-light);
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.submission-info i {
  color: var(--success-color);
}

.assignment-actions {
  padding: 15px 20px;
  display: flex;
  justify-content: flex-end;
}

/* 请假申请样式 */
.leave-form-card {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray);
  border-radius: 6px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

.form-group.half {
  flex: 1;
  margin-bottom: 0;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-upload input {
  display: none;
}

.file-upload label {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-upload label:hover {
  background-color: #0E42D2;
}

.file-name {
  flex: 1;
  color: var(--text-light);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leave-records {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.leave-record {
  border: 1px solid var(--gray);
  border-radius: 6px;
  overflow: hidden;
}

.record-header {
  padding: 10px 15px;
  background-color: var(--gray-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.record-header h4 {
  font-weight: 600;
}

.record-details {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.record-details p {
  display: flex;
  align-items: center;
  gap: 5px;
}

.reject-reason {
  color: var(--danger-color);
}

.status {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status.approved {
  background-color: #52C41A20;
  color: #52C41A;
}

.status.pending {
  background-color: #FAAD1420;
  color: #FAAD14;
}

.status.rejected {
  background-color: #FF4D4F20;
  color: #FF4D4F;
}

.status.present {
  background-color: #52C41A20;
  color: #52C41A;
}

.status.absent {
  background-color: #FF4D4F20;
  color: #FF4D4F;
}

/* 签到样式 */
.checkin-card {
  border-top: 3px solid var(--primary-color);
}

.checkin-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  text-align: center;
}

.current-course {
  margin-bottom: 20px;
}

.current-course h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.checkin-status {
  margin-top: 10px;
  font-weight: 600;
}

.checkin-status.pending {
  color: var(--warning-color);
}

.checkin-status.completed {
  color: var(--success-color);
}

.checkin-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.checkin-note {
  color: var(--text-light);
  font-size: 14px;
  max-width: 500px;
}

.attendance-table {
  overflow-x: auto;
}

.attendance-table table {
  width: 100%;
  border-collapse: collapse;
}

.attendance-table th,
.attendance-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--gray);
}

.attendance-table th {
  font-weight: 600;
  background-color: var(--gray-light);
}

.attendance-stats {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 20px;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
}

.stat-label {
  color: var(--text-light);
  font-size: 14px;
}

/* 通知样式 */
.notification-wrapper {
  position: relative;
}

.notification-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 18px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.notification-btn:hover {
  color: var(--primary-color);
}

.notification-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 350px;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  z-index: 100;
  margin-top: 10px;
  overflow: hidden;
  display: none;
}

.panel-header {
  padding: 10px 15px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-controls {
  padding: 10px 15px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-controls select {
  padding: 5px 10px;
  border: 1px solid var(--gray);
  border-radius: 4px;
  font-size: 14px;
}

.panel-controls button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.panel-controls button:hover {
  text-decoration: underline;
}

.notification-list {
  max-height: 400px;
  overflow-y: auto;
}

.notification-item {
  padding: 12px 15px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: var(--transition);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background-color: var(--gray-light);
}

.notification-item.unread {
  background-color: var(--primary-light);
}

.notification-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
}

.notification-content p {
  margin-bottom: 5px;
}

.time {
  color: var(--text-light);
  font-size: 12px;
}

.mark-read {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 12px;
  cursor: pointer;
  align-self: center;
  transition: var(--transition);
}

.mark-read:hover {
  text-decoration: underline;
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notifications-controls {
  display: flex;
  gap: 10px;
}

.notifications-controls select {
  padding: 5px 10px;
  border: 1px solid var(--gray);
  border-radius: 4px;
  font-size: 14px;
}

.notifications-controls button {
  background: none;
  border: 1px solid var(--gray);
  color: var(--text-color);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.notifications-controls button:hover {
  background-color: var(--gray-light);
}

.notifications-body {
  padding: 0;
}

/* 用户菜单样式 */
.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  transition: var(--transition);
}

.user-btn:hover {
  background-color: var(--gray-light);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  z-index: 100;
  margin-top: 10px;
  overflow: hidden;
  display: none;
}

.user-info {
  padding: 15px;
  border-bottom: 1px solid var(--gray);
}

.user-info p:first-child {
  font-weight: 600;
}

.user-info p:last-child {
  color: var(--text-light);
  font-size: 14px;
}

.dropdown-divider {
  border-top: 1px solid var(--gray);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 15px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-item:hover {
  background-color: var(--gray-light);
}

/* 模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  background-color: var(--white);
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-hover);
  animation: modalFadeIn 0.3s ease;
}

.large-modal {
  max-width: 700px;
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger-color);
}

.modal-body {
  padding: 20px;
}

/* 登录注册表单样式 */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.input-icon input {
  padding-left: 36px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.toggle-password:hover {
  color: var(--text-color);
}

.form-check {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 5px;
}

.form-check label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: normal;
}

.forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.forgot-password:hover {
  text-decoration: underline;
}

.auth-switch {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
}

.auth-switch button {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.auth-switch button:hover {
  text-decoration: underline;
}

/* 提示消息样式 */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--white);
  border-radius: 6px;
  box-shadow: var(--shadow-hover);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  animation: toastIn 0.3s ease;
}

.toast i {
  font-size: 18px;
}

/* 实验室信息样式 */
.lab-info {
  padding: 20px 15px;
  margin-top: 20px;
  border-top: 1px solid var(--gray);
}

.lab-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-indicator.online {
  background-color: var(--success-color);
}

.status-indicator.offline {
  background-color: var(--danger-color);
}

.current-course {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 14px;
}

/* 徽章样式 */
.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--danger-color);
  color: var(--white);
  font-size: 12px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.nav-badge {
  position: static;
  display: inline-flex;
  margin-left: auto;
}

.notification-badge {
  position: static;
  display: inline-flex;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
    padding: 20px 0;
  }

  .sidebar-nav {
    padding: 0 5px;
  }

  .nav-item span {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .lab-info {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .forum-header,
  .thread-item {
    grid-template-columns: 50% 20% 15% 15%;
  }

  .thread-info p {
    display: none;
  }

  .search-box {
    width: 200px;
  }

  .form-row {
    flex-direction: column;
    gap: 15px;
  }

  .form-group.half {
    margin-bottom: 15px;
  }

  .notification-panel {
    width: 300px;
  }
}

@media (max-width: 576px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .forum-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .search-box {
    width: 100%;
  }

  .forum-header,
  .thread-item {
    grid-template-columns: 45% 20% 15% 20%;
  }

  .thread-tags {
    display: none;
  }

  .last-post-info {
    font-size: 12px;
  }

  .assignment-details {
    flex-direction: column;
    gap: 5px;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }

  .notification-panel {
    width: calc(100% - 20px);
  }

  .user-btn span {
    display: none;
  }
}

/* 显示/隐藏类 */
.hidden {
  display: none !important;
}

.file-note {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 5px;
}